* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    display: flex;
    height: 100vh;
    backdrop-filter: blur(10px);
    margin: 0;
    padding: 0;
}

/* 左侧导航栏 */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    margin: 0;
    padding: 0;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.logo-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.storage-info {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
}

.nav-section {
    padding: 0 0 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-section:last-child {
    border-bottom: none;
    padding-bottom: 16px;
}

.nav-title {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 20px 10px;
    padding: 4px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-size: 14px;
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item:hover {
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 文件类型容器样式 */
.file-types-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.file-types-container.expanded {
    max-height: 300px; /* 足够的高度来显示所有文件类型 */
}

/* 文件类型项样式 */
.nav-item.file-type-item {
    padding-left: 40px; /* 缩进显示层级关系 */
    font-size: 13px;
    color: #888;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-item.file-type-item:hover {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.nav-item.file-type-item.active {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 500;
}

/* 折叠箭头样式 */
.dropdown-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #999;
    /* 扩大可点击范围 */
    padding: 8px 10px;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-arrow.collapsed {
    transform: rotate(-90deg);
}

/* 下拉框样式 */
.nav-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    cursor: pointer;
    position: relative;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #999;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(0deg);
    color: #667eea;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    display: none;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    border-radius: 0;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #1976d2;
}

.dropdown-item .nav-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
    border-radius: 6px;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 0;
    height: 100vh;
    padding: 0;
}

.main-content:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 顶部搜索容器 */
.top-search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    height: auto;
    min-height: auto;
}

/* 搜索框容器，占85%宽度，高度与search-box一致 */
.top-search-container .search-box {
    flex: 1;
    max-width: 85%;
    margin: 0;
    padding: 20px;
    padding-right: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 用户区域，占更少空间，高度与搜索框一致 */
.top-search-container .user-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    padding-left: 0;
    height: 100%;
    min-height: 100%;
}

/* 用户区域样式（已在.top-search-container中定义，这里保留基础样式） */
.user-section {
    position: relative;
    display: flex;
    align-items: center;
}

.user-name {
    color: #666;
    font-size: 14px;
    padding: 8px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.user-name:hover {
    background: #f0f0f0;
}

.logout-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    min-width: 100px;
}

.logout-btn {
    width: 100%;
    padding: 10px 20px;
    background: white;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.logout-btn:hover {
    background: #f0f0f0;
    color: #d32f2f;
}

/* iframe内容容器 */
.content-iframe-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.content-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    margin: 0;
    padding: 0;
}

/* 顶部工具栏 */
.toolbar {
    padding: 12px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.toolbar-top {
    display: flex;
    justify-content: space-between; /* 左右分布 */
    align-items: center;
    margin-bottom: 12px;
    gap: 20px;
    height: 48px; /* 固定高度确保按钮垂直居中 */
}

.btn-group {
    display: flex;
    gap: 10px; /* 上传和搜索按钮之间的间距 */
    align-items: center; /* 确保按钮组内按钮垂直居中 */
}

.upload-btn, .search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0 28px !important; /* 强制覆盖其他padding规则 */
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: 120px;
    height: 48px !important; /* 强制固定高度 */
    display: flex !important; /* 强制使用flex布局 */
    align-items: center !important; /* 强制垂直居中 */
    justify-content: center !important; /* 强制水平居中 */
    line-height: 1 !important; /* 重置行高 */
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:hover, .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center; /* 确保操作按钮也垂直居中 */
}

/* 面包屑导航样式 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.breadcrumb-nav .breadcrumb-item {
    color: #1976d2;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.breadcrumb-nav .breadcrumb-item:hover {
    background-color: #f5f5f5;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #333;
    font-weight: 500;
    background-color: #e3f2fd;
}

.breadcrumb-nav .breadcrumb-separator {
    color: #999;
    margin: 0 4px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0 16px !important; /* 强制覆盖其他padding规则 */
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    font-weight: 500;
    height: 40px !important; /* 强制固定高度 */
    display: flex !important; /* 强制使用flex布局 */
    align-items: center !important; /* 强制垂直居中 */
    justify-content: center !important; /* 强制水平居中 */
    line-height: 1 !important; /* 重置行高 */
}

.action-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-item {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #667eea;
}

.breadcrumb-separator {
    color: #ccc;
}

/* 文件列表 */
.file-list {
    flex: 1;
    overflow: auto;
    background: rgba(255, 255, 255, 0.5);
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: transparent;
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.file-table th {
    background: rgba(255, 255, 255, 0.9);
    padding: 18px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.file-table th:first-child {
    width: 50px;
}

.file-table th:nth-child(2) {
    width: auto;
}

.file-table th:nth-child(3) {
    width: 120px;
}

.file-table th:nth-child(4) {
    width: 100px;
}

.file-table th:nth-child(5) {
    width: 160px;
}

.file-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    vertical-align: middle;
}

.file-table tr:hover td {
    background: rgba(102, 126, 234, 0.05);
}

.file-table tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.file-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.file-checkbox:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.file-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.file-item:hover .file-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.file-icon.folder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.file-icon.image {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.file-icon.document {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}

.file-icon.video {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.file-icon.audio {
    background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 100%);
}

.file-icon.other {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.file-name {
    font-weight: 500;
    color: #333;
    transition: color 0.2s ease;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name:hover {
    color: #667eea;
}

.file-size {
    color: #666;
    font-size: 12px;
}

.file-type {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-date {
    color: #666;
    font-size: 12px;
}

/* 上传模态框 */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.upload-modal.show {
    display: flex;
    opacity: 1;
}

.upload-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upload-modal.show .upload-content {
    transform: scale(1);
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

.upload-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 0;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
    margin-bottom: 16px;
}

.upload-area:hover {
    border-color: #4A90E2;
    background: #f8fbff;
    transform: translateY(-1px);
}

.upload-area.dragover {
    border-color: #4A90E2;
    background: #f0f8ff;
    transform: scale(1.01);
}

.upload-icon {
    font-size: 36px;
    color: #999;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #4A90E2;
    transform: scale(1.05);
}

.upload-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.file-input {
    display: none;
}

/* 文件列表容器样式 */
.file-list-container {
    margin-bottom: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.btn-clear {
    background: none;
    border: none;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: #e5e5e5;
    color: #333;
}

.file-list {
    max-height: 160px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f8f8f8;
}

.file-icon {
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: #999;
}

.file-remove {
    background: none;
    border: none;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove:hover {
    color: #e74c3c;
    background: #fdf2f2;
}

.upload-progress {
    margin-top: 20px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.upload-actions {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 260px;
    }

    .main-content {
        margin: 15px;
    }

    .toolbar {
        padding: 10px 22px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        height: auto;
        order: 2;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .main-content {
        margin: 0;
        order: 1;
        flex: 1;
        min-height: calc(100vh - 200px);
    }

    .toolbar {
        padding: 8px 20px;
    }

    .file-table th,
    .file-table td {
        padding: 12px 16px;
    }

    .upload-content {
        margin: 20px;
        max-height: 85vh;
    }
    
    .upload-body {
        padding: 16px 20px;
    }
    
    .upload-actions {
        padding: 12px 20px;
    }

    .nav-section {
        padding: 0 0 10px 0;
    }

    .nav-item {
        padding: 10px 20px;
    }

    .dropdown-menu {
        margin: 4px 0 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        border: none;
    }

    .dropdown-item {
        padding: 8px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin: 0;
        border-radius: 0;
    }

    .toolbar {
        padding: 6px 16px;
    }

    /*.toolbar-top {*/
    /*    flex-direction: column;*/
    /*    gap: 12px;*/
    /*    align-items: stretch;*/
    /*}*/
    .toolbar-top {
        display: flex;
        align-items: center;
        justify-content: space-between; /* 让左侧和右侧按钮分别靠两端对齐 */
        margin-bottom: 20px;
    }

    .left-btns, .right-btns {
        display: flex;
        gap: 10px; /* 按钮之间的间距，可根据需要调整 */
    }

    .toolbar-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        min-width: 80px;
        font-size: 11px;
        padding: 6px 8px;
    }

    .file-table th,
    .file-table td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .file-table th:nth-child(3),
    .file-table th:nth-child(4),
    .file-table th:nth-child(5),
    .file-table td:nth-child(3),
    .file-table td:nth-child(4),
    .file-table td:nth-child(5) {
        display: none;
    }

    .upload-content {
        margin: 10px;
        width: 95%;
        max-height: 90vh;
    }
    
    .upload-body {
        padding: 12px 16px;
    }
    
    .upload-actions {
        padding: 10px 16px;
    }
    
    .upload-area {
        padding: 20px 15px;
    }
    
    .file-list {
        max-height: 120px;
    }

    .floating-action {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功提示 */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
}

.success-message.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* 错误提示 */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
}

.error-message.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* 文件拖拽效果 */
.file-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* 悬浮效果 */
.floating-action {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
}

.floating-action:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

/* 内容区域 */
.content {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin: 0;
    padding: 20px;
    display: flex; /*让搜索图标和输入框横向排列 */
    align-items: center; /*图标和输入框垂直居中 */
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px 12px 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

/* 搜索按钮 */
.search-btn, .advanced-search-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn {
    background: #667eea;
    color: white;
}

.search-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.advanced-search-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
}

.advanced-search-btn:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
}

/* 高级搜索弹窗 */
.advanced-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #666;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.search-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.control-group select,
.control-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-time, .custom-size {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.custom-time input,
.custom-size input {
    flex: 1;
}

.sort-controls {
    display: flex;
    gap: 12px;
}

.sort-controls select {
    flex: 1;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.apply-search-btn, .reset-search-btn, .cancel-search-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.apply-search-btn {
    background: #667eea;
    color: white;
}

.apply-search-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.reset-search-btn {
    background: #6c757d;
    color: white;
}

.reset-search-btn:hover {
    background: #5a6268;
}

.cancel-search-btn {
    background: #dc3545;
    color: white;
}

.cancel-search-btn:hover {
    background: #c82333;
}

/* 额外的视觉增强 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 12px;
    opacity: 0.7;
}

/* 加载状态 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

/* 平滑过渡效果 */
* {
    scroll-behavior: smooth;
}

/* 焦点状态优化 */
.nav-item:focus,
.upload-btn:focus,
.action-btn:focus,
.search-input:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* 高级搜索框样式（匹配原型图，无标签选项） */
.advanced-search {
    display: none; /* 默认隐藏 */
    margin: 16px 0;
    padding: 16px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}
.advanced-search.show { display: block; } /* 点击搜索按钮后显示 */

/* 筛选控件容器（时间/大小/排序） */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center; /* 垂直居中对齐，避免输入框和按钮高度不一致 */
}

/* 输入框专属容器：占 1/2 宽度 */
.search-input-wrapper {
    flex: 1; /* 占父容器（.search-filters）的 50% 宽度 */
    min-width: 200px; /* 最小宽度，避免屏幕过窄时输入框太挤 */
}

/* 按钮组专属容器：占 1/2 宽度，内部横向排列三个按钮 */
.filter-buttons-group {
    flex: 1; /* 与输入框容器均分宽度，各占 50% */
    display: flex; /* 让三个按钮横向排列 */
    gap: 12px; /* 三个按钮之间的间距 */
    align-items: center; /* 按钮垂直居中 */
}

.filter-item {
    flex-shrink: 0;
}
.filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}
.filter-btn {
    width: 120px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}
.filter-btn:hover { border-color: #667eea; }

/* 收起按钮（右下角） */
.collapse-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
}
.collapse-btn:hover { color: #667eea; }

/* 搜索建议下拉框 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item, .history-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #666;
}

.suggestion-item:hover, .history-item:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.history-label {
    padding: 8px 16px;
    font-size: 12px;
    color: #999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


/* 原型图弹框样式（时间/大小/排序/导出） */
/*.search-modal {*/
/*    display: none; !* 默认隐藏 *!*/
/*    position: fixed;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background: rgba(0,0,0,0.5);*/
/*    backdrop-filter: blur(4px);*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    z-index: 1000;*/
/*}*/
/*.search-modal.show { display: flex; }*/
/*.modal-content {*/
/*    background: white;*/
/*    border-radius: 8px;*/
/*    width: 90%;*/
/*    max-width: 360px;*/
/*    padding: 20px;*/
/*    box-shadow: 0 4px 20px rgba(0,0,0,0.15);*/
/*}*/
/*.modal-title {*/
/*    font-size: 16px;*/
/*    font-weight: 600;*/
/*    margin-bottom: 16px;*/
/*    color: #333;*/
/*}*/
/*.modal-form { gap: 12px; display: flex; flex-direction: column; }*/
/*.modal-input {*/
/*    padding: 10px 12px;*/
/*    border: 1px solid rgba(0,0,0,0.1);*/
/*    border-radius: 6px;*/
/*    font-size: 14px;*/
/*}*/
/*.modal-actions {*/
/*    display: flex;*/
/*    justify-content: flex-end;*/
/*    gap: 10px;*/
/*    margin-top: 16px;*/
/*}*/
/*.modal-btn {*/
/*    padding: 8px 16px;*/
/*    border-radius: 6px;*/
/*    font-size: 14px;*/
/*    cursor: pointer;*/
/*}*/

/* 弹框样式 - 统一模态框风格 */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.filter-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.filter-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    color: #666;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 排序选项样式 */
.sort-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:hover, .sort-option.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.sort-radio {
    accent-color: #667eea;
}

/* 模态框操作按钮 */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-cancel {
    background: #f5f5f5;
    border: 1px solid #eee;
    color: #666;
}
.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

/* 导出成功弹框 */
/*.success-modal-content {*/
/*    text-align: center;*/
/*    padding: 24px;*/
/*}*/
/*.success-icon {*/
/*    font-size: 48px;*/
/*    color: #4CAF50;*/
/*    margin-bottom: 16px;*/
/*}*/

/* 导出成功提示 */
.export-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.export-success.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.success-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 16px;
}

.success-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.success-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .search-filters {
        padding: 12px 16px;
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .search-stats {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal-content {
        padding: 20px;
        max-width: 320px;
    }

    .sort-options {
        grid-template-columns: 1fr;
    }

    .page-btn, .page-number {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .search-filters {
        justify-content: space-between;
    }

    .filter-item {
        width: 48%;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .export-success {
        padding: 20px;
        max-width: 280px;
    }

    .success-icon {
        font-size: 36px;
    }

    .success-title {
        font-size: 16px;
    }
}

/* 悬浮提示面板 - 百度风格 */
.search-suggest {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999; /* 高于文件列表层级 */
    max-height: 400px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 搜索历史样式 */
.search-history-header {
    padding: 8px 16px;
    color: #999;
    font-size: 12px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
}
.search-history-item {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}
.search-history-item:hover {
    background: #f8f8f8;
}
.search-history-delete {
    color: #ff4444;
    cursor: pointer;
    display: none;
    font-size: 12px;
}
.search-history-item:hover .search-history-delete {
    display: inline;
}
.search-empty {
    padding: 30px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 实时匹配结果样式（左文件名 + 右内容） */
.search-match-item {
    padding: 10px 16px;
    display: flex;
    gap: 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    font-size: 14px;
}
.search-match-item:hover {
    background: #f8f8f8;
}
.search-match-name {
    flex: 1; /* 左侧文件名占1份宽度 */
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-match-content {
    flex: 2; /* 右侧内容占2份宽度 */
    color: #666;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-match-deleteTime {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-match-createTime {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 高亮关键词样式（复用你原有的highlight-keyword） */
.highlight-keyword {
    background-color: #fff143;
    font-weight: bold;
    padding: 0 2px;
}